configureWebView

fun configureWebView(webView: WebView, userAgent: String, webViewClient: <Error class: unknown class>)

This is to configure the WebView with the settings we need for Ads to work properly we are turning doing the following:

  • javascriptEnabled = true

  • domStorageEnabled = true

  • mediaPlaybackRequiresUserGesture = false

  • userAgentString = userAgent

  • webViewClient = webViewClient

  • enabling third party cookies when possible (only on API 21 and above)

  • registering the webView with the Google Ads to allow the sending of notifications

Return

Unit

Parameters

webView

WebView

userAgent

String

webViewClient

R89WebViewClient